# -*- coding: utf-8 -*-
# @Time    : 2020-10-22 10:29
# @Author  : Leo
# @FileName: login_handler.py
# @Software: PyCharm
import json
import tornado.web
from modules.user.user_manage import UserManager
from handlers.base_handler import BaseHandler

class OrderHandler(BaseHandler):
    '''
    处理订餐和取消订餐
    '''

    def post(self):
        '''
        @return:
        '''
        data = json.loads(self.request.body)
        self.write(UserManager().update_order(
            loginName=data['loginName'], isOrder=data['isOrder'], position=data['position'], orderType=data['orderType']))
